#pragma once

#include <imaging.h>
#include "Common.h"

enum EImageFormat
{
  ifPng,
  ifJpeg,
  ifGif
};

class CUtil
{
public:
  static bool ParseColor(const TCHAR* val, COLORREF& clr);
  static CString MakeColor(COLORREF clr);

  static bool IsImageFile(const TCHAR* sFile);

  static bool LoadPictureFromFile(IImage** pImage, const TCHAR* sFile);
  static bool SavePictureToFile(IImage* pImage, const TCHAR* sFile, EImageFormat format);

  static bool GetAppVersion(int& h1, int& h2, int& m1, int& m2);

  static bool EnumEmailAccounts(CStringVector& list);
};
